package cn.santi.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 我的预约表
 * @TableName j_appointment
 */
@TableName(value ="j_appointment")
@Data
public class JAppointment implements Serializable {
    /**
     * 预约表id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    private Integer uid;

    /**
     * 家政员id
     */
    private Integer sid;

    /**
     * 客户名称
     */
    private String customername;

    /**
     * 
联系电话
     */
    private String contactphone;

    /**
     * 上门地址
     */
    private String address;

    /**
     * 户型面积
     */
    private String housearea;

    /**
     * 预约日期
     */
    private Integer sdateid;

    /**
     * 预约时间
     */
    private Integer stimeid;

    /**
     * 提交时间，默认为当前时间
     */
    private String submittime;

    /**
     * 预约状态（1可使用，2已核销，3已过期，
0系统取消）
     */
    private String appointmentstatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        JAppointment other = (JAppointment) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getSid() == null ? other.getSid() == null : this.getSid().equals(other.getSid()))
            && (this.getCustomername() == null ? other.getCustomername() == null : this.getCustomername().equals(other.getCustomername()))
            && (this.getContactphone() == null ? other.getContactphone() == null : this.getContactphone().equals(other.getContactphone()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getHousearea() == null ? other.getHousearea() == null : this.getHousearea().equals(other.getHousearea()))
            && (this.getSdateid() == null ? other.getSdateid() == null : this.getSdateid().equals(other.getSdateid()))
            && (this.getStimeid() == null ? other.getStimeid() == null : this.getStimeid().equals(other.getStimeid()))
            && (this.getSubmittime() == null ? other.getSubmittime() == null : this.getSubmittime().equals(other.getSubmittime()))
            && (this.getAppointmentstatus() == null ? other.getAppointmentstatus() == null : this.getAppointmentstatus().equals(other.getAppointmentstatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getSid() == null) ? 0 : getSid().hashCode());
        result = prime * result + ((getCustomername() == null) ? 0 : getCustomername().hashCode());
        result = prime * result + ((getContactphone() == null) ? 0 : getContactphone().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getHousearea() == null) ? 0 : getHousearea().hashCode());
        result = prime * result + ((getSdateid() == null) ? 0 : getSdateid().hashCode());
        result = prime * result + ((getStimeid() == null) ? 0 : getStimeid().hashCode());
        result = prime * result + ((getSubmittime() == null) ? 0 : getSubmittime().hashCode());
        result = prime * result + ((getAppointmentstatus() == null) ? 0 : getAppointmentstatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", uid=").append(uid);
        sb.append(", sid=").append(sid);
        sb.append(", customername=").append(customername);
        sb.append(", contactphone=").append(contactphone);
        sb.append(", address=").append(address);
        sb.append(", housearea=").append(housearea);
        sb.append(", sdateid=").append(sdateid);
        sb.append(", stimeid=").append(stimeid);
        sb.append(", submittime=").append(submittime);
        sb.append(", appointmentstatus=").append(appointmentstatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}